#include "SMPPCallbackNum.hpp"

using namespace smpp::pdu;

CallbackNum::CallbackNum(const octetString &nValue):
TLV(TLVtags::TAG_CALLBACK_NUM,nValue.size()),_Value(nValue){}

CallbackNum::CallbackNum(const CallbackNum &nCallbackNum):
TLV(nCallbackNum),_Value(nCallbackNum.getValue()){}

bool CallbackNum::operator ==(const CallbackNum &nCallbackNum) const{
	return (TLV::operator == (nCallbackNum) && 
			_Value == nCallbackNum.getValue());
}

bool CallbackNum::operator !=(const CallbackNum &nCallbackNum) const{
	return !this->operator == (nCallbackNum);
}

CallbackNum &CallbackNum::operator = (const CallbackNum &nCallbackNum){
	if(*this == nCallbackNum)
		return *this;
	TLV::operator = (nCallbackNum);
	_Value = nCallbackNum.getValue();
	return *this;
}

void CallbackNum::setValue(const octetString &nValue){
	_Value = nValue;
}

const octetString &CallbackNum::getValue() const{
	return _Value;
}
